package com.jingjia.service;

import com.spring.Autowired;
import com.spring.BeanNameAware;
import com.spring.Component;
import com.spring.InitializingBean;

@Component
public class UserService implements InitializingBean, BeanNameAware {
    @Autowired
    private OrderService orderService;

    @Override
    public void afterPropertiesSet() {
        System.out.println("UserService init");
    }

    @Override
    public void setBeanName(String name) {
        System.out.println("beanName: " + name);
    }

    public void test() {
        orderService.test();
    }
}
